package com.i2bt.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class MainPagerAdapter extends FragmentPagerAdapter{
	
	private Fragment[] fragments;
	
	public MainPagerAdapter(FragmentManager fm, Fragment[] fragments) {
		super(fm);
		this.fragments = fragments;
	}

	private String[] title = {"我的目录", "分享动态", "好友管理", "传输列表"};
	

	@Override
	public Fragment getItem(int arg0) {
		return fragments[arg0];
	}

	@Override
	public int getCount() {
		return fragments.length;
	}
	
	@Override
	public CharSequence getPageTitle(int position) {
		return title[position];
	}

}
